﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Enter.Services.DataCache
{
    public interface ICache
    {
        T Get<T>(string key);

        T Get<T>(string key, Enter.Common.CacheHelper.CacheDelegate Cachedelegate);

        T Get<T>(string key, int Seconds, Enter.Common.CacheHelper.CacheDelegate Cachedelegate);

        void Remove(string key);

        void Put(string key, object value);

        void Put(string key, object value, int Seconds);

        /// <summary>
        /// 是否使用缓存
        /// </summary>
        bool IsCache();
    }
}
